home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / sgitcl_dev.idb / usr / sgitcl / include / tcl.h.z / tcl.h
C/C++ Source or Header  |  1996-03-14  |  23KB  |  638 lines

  1. /*
  2.  * tcl.h --
  3.  *
  4.  *    This header file describes the externally-visible facilities
  5.  *    of the Tcl interpreter.
  6.  *
  7.  * Copyright (c) 1987-1994 The Regents of the University of California.
  8.  * Copyright (c) 1994-1995 Sun Microsystems, Inc.
  9.  *
  10.  * See the file "license.terms" for information on usage and redistribution
  11.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  12.  *
  13.  * @(#) tcl.h 1.153 95/06/27 15:42:31
  14.  */
  15.  
  16. #ifndef _TCL
  17. #define _TCL
  18.  
  19. #ifndef BUFSIZ
  20. #include <stdio.h>
  21. #endif
  22.  
  23. #define TCL_VERSION "7.4"
  24. #define TCL_MAJOR_VERSION 7
  25. #define TCL_MINOR_VERSION 4
  26.  
  27. /*
  28.  * Definitions that allow this header file to be used either with or
  29.  * without ANSI C features like function prototypes.
  30.  */
  31.  
  32. #undef _ANSI_ARGS_
  33. #undef CONST
  34. #if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus)
  35. #   define _USING_PROTOTYPES_ 1
  36. #   define _ANSI_ARGS_(x)    x
  37. #   define CONST const
  38. #   ifdef __cplusplus
  39. #       define VARARGS(first) (first, ...)
  40. #   else
  41. #       define VARARGS(first) ()
  42. #   endif
  43. #else
  44. #   define _ANSI_ARGS_(x)    ()
  45. #   define CONST
  46. #endif
  47.  
  48. #ifdef __cplusplus
  49. #   define EXTERN extern "C"
  50. #else
  51. #   define EXTERN extern
  52. #endif
  53.  
  54. /*
  55.  * Macro to use instead of "void" for arguments that must have
  56.  * type "void *" in ANSI C;  maps them to type "char *" in
  57.  * non-ANSI systems.
  58.  */
  59.  
  60. #ifndef VOID
  61. #   ifdef __STDC__
  62. #       define VOID void
  63. #   else
  64. #       define VOID char
  65. #   endif
  66. #endif
  67.  
  68. /*
  69.  * Miscellaneous declarations (to allow Tcl to be used stand-alone,
  70.  * without the rest of Sprite).
  71.  */
  72.  
  73. #ifndef NULL
  74. #define NULL 0
  75. #endif
  76.  
  77. #ifndef _CLIENTDATA
  78. #   if defined(__STDC__) || defined(__cplusplus)
  79.     typedef void *ClientData;
  80. #   else
  81.     typedef int *ClientData;
  82. #   endif /* __STDC__ */
  83. #define _CLIENTDATA
  84. #endif
  85.  
  86. /*
  87.  * Data structures defined opaquely in this module.  The definitions
  88.  * below just provide dummy types.  A few fields are made visible in
  89.  * Tcl_Interp structures, namely those for returning string values.
  90.  * Note:  any change to the Tcl_Interp definition below must be mirrored
  91.  * in the "real" definition in tclInt.h.
  92.  */
  93.  
  94. typedef struct Tcl_Interp{
  95.     char *result;        /* Points to result string returned by last
  96.                  * command. */
  97.     void (*freeProc) _ANSI_ARGS_((char *blockPtr));
  98.                 /* Zero means result is statically allocated.
  99.                  * If non-zero, gives address of procedure
  100.                  * to invoke to free the result.  Must be
  101.                  * freed by Tcl_Eval before executing next
  102.                  * command. */
  103.     int errorLine;        /* When TCL_ERROR is returned, this gives
  104.                  * the line number within the command where
  105.                  * the error occurred (1 means first line). */
  106. } Tcl_Interp;
  107.  
  108. typedef int *Tcl_Trace;
  109. typedef int *Tcl_Command;
  110. typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
  111. typedef struct Tcl_RegExp_ *Tcl_RegExp;
  112.  
  113. /*
  114.  * When a TCL command returns, the string pointer interp->result points to
  115.  * a string containing return information from the command.  In addition,
  116.  * the command procedure returns an integer value, which is one of the
  117.  * following:
  118.  *
  119.  * TCL_OK        Command completed normally;  interp->result contains
  120.  *            the command's result.
  121.  * TCL_ERROR        The command couldn't be completed successfully;
  122.  *            interp->result describes what went wrong.
  123.  * TCL_RETURN        The command requests that the current procedure
  124.  *            return;  interp->result contains the procedure's
  125.  *            return value.
  126.  * TCL_BREAK        The command requests that the innermost loop
  127.  *            be exited;  interp->result is meaningless.
  128.  * TCL_CONTINUE        Go on to the next iteration of the current loop;
  129.  *            interp->result is meaningless.
  130.  */
  131.  
  132. #define TCL_OK        0
  133. #define TCL_ERROR    1
  134. #define TCL_RETURN    2
  135. #define TCL_BREAK    3
  136. #define TCL_CONTINUE    4
  137.  
  138. #define TCL_RESULT_SIZE 200
  139.  
  140. /*
  141.  * Argument descriptors for math function callbacks in expressions:
  142.  */
  143.  
  144. typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
  145. typedef struct Tcl_Value {
  146.     Tcl_ValueType type;        /* Indicates intValue or doubleValue is
  147.                  * valid, or both. */
  148.     long intValue;        /* Integer value. */
  149.     double doubleValue;        /* Double-precision floating value. */
  150. } Tcl_Value;
  151.  
  152. /*
  153.  * Procedure types defined by Tcl:
  154.  */
  155.  
  156. typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
  157. typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
  158.     Tcl_Interp *interp, int code));
  159. typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
  160. typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
  161.     Tcl_Interp *interp, int argc, char *argv[]));
  162. typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
  163.     Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
  164.     ClientData cmdClientData, int argc, char *argv[]));
  165. typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
  166. typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
  167.     Tcl_Interp *interp));
  168. typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
  169.     Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
  170. typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
  171.     Tcl_Interp *interp, char *part1, char *part2, int flags));
  172.  
  173. /*
  174.  * The structure returned by Tcl_GetCmdInfo and passed into
  175.  * Tcl_SetCmdInfo:
  176.  */
  177.  
  178. typedef struct Tcl_CmdInfo {
  179.     Tcl_CmdProc *proc;            /* Procedure that implements command. */
  180.     ClientData clientData;        /* ClientData passed to proc. */
  181.     Tcl_CmdDeleteProc *deleteProc;    /* Procedure to call when command
  182.                      * is deleted. */
  183.     ClientData deleteData;        /* Value to pass to deleteProc (usually
  184.                      * the same as clientData). */
  185. } Tcl_CmdInfo;
  186.  
  187. /*
  188.  * The structure defined below is used to hold dynamic strings.  The only
  189.  * field that clients should use is the string field, and they should
  190.  * never modify it.
  191.  */
  192.  
  193. #define TCL_DSTRING_STATIC_SIZE 200
  194. typedef struct Tcl_DString {
  195.     char *string;        /* Points to beginning of string:  either
  196.                  * staticSpace below or a malloc'ed array. */
  197.     int length;            /* Number of non-NULL characters in the
  198.                  * string. */
  199.     int spaceAvl;        /* Total number of bytes available for the
  200.                  * string and its terminating NULL char. */
  201.     char staticSpace[TCL_DSTRING_STATIC_SIZE];
  202.                 /* Space to use in common case where string
  203.                  * is small. */
  204. } Tcl_DString;
  205.  
  206. #define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
  207. #define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
  208. #define Tcl_DStringTrunc Tcl_DStringSetLength
  209.  
  210. /*
  211.  * Definitions for the maximum number of digits of precision that may
  212.  * be specified in the "tcl_precision" variable, and the number of
  213.  * characters of buffer space required by Tcl_PrintDouble.
  214.  */
  215.  
  216. #define TCL_MAX_PREC 17
  217. #define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
  218.  
  219. /*
  220.  * Flag that may be passed to Tcl_ConvertElement to force it not to
  221.  * output braces (careful!  if you change this flag be sure to change
  222.  * the definitions at the front of tclUtil.c).
  223.  */
  224.  
  225. #define TCL_DONT_USE_BRACES    1
  226.  
  227. /*
  228.  * Flag values passed to Tcl_RecordAndEval.
  229.  * WARNING: these bit choices must not conflict with the bit choices
  230.  * for evalFlag bits in tclInt.h!!
  231.  */
  232.  
  233. #define TCL_NO_EVAL        0x10000
  234. #define TCL_EVAL_GLOBAL        0x20000
  235.  
  236. /*
  237.  * Special freeProc values that may be passed to Tcl_SetResult (see
  238.  * the man page for details):
  239.  */
  240.  
  241. #define TCL_VOLATILE    ((Tcl_FreeProc *) 1)
  242. #define TCL_STATIC    ((Tcl_FreeProc *) 0)
  243. #define TCL_DYNAMIC    ((Tcl_FreeProc *) 3)
  244.  
  245. /*
  246.  * Flag values passed to variable-related procedures.
  247.  */
  248.  
  249. #define TCL_GLOBAL_ONLY        1
  250. #define TCL_APPEND_VALUE    2
  251. #define TCL_LIST_ELEMENT    4
  252. #define TCL_TRACE_READS        0x10
  253. #define TCL_TRACE_WRITES    0x20
  254. #define TCL_TRACE_UNSETS    0x40
  255. #define TCL_TRACE_DESTROYED    0x80
  256. #define TCL_INTERP_DESTROYED    0x100
  257. #define TCL_LEAVE_ERR_MSG    0x200
  258.  
  259. /*
  260.  * Types for linked variables:
  261.  */
  262.  
  263. #define TCL_LINK_INT        1
  264. #define TCL_LINK_DOUBLE        2
  265. #define TCL_LINK_BOOLEAN    3
  266. #define TCL_LINK_STRING        4
  267. #define TCL_LINK_READ_ONLY    0x80
  268.  
  269. /*
  270.  * Permission flags for files:
  271.  */
  272.  
  273. #define TCL_FILE_READABLE    1
  274. #define TCL_FILE_WRITABLE    2
  275.  
  276. /*
  277.  * The following declarations either map ckalloc and ckfree to
  278.  * malloc and free, or they map them to procedures with all sorts
  279.  * of debugging hooks defined in tclCkalloc.c.
  280.  */
  281.  
  282. #ifdef TCL_MEM_DEBUG
  283.  
  284. EXTERN char *        Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
  285.                 char *file, int line));
  286. EXTERN int        Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
  287.                 char *file, int line));
  288. EXTERN char *        Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
  289.                 unsigned int size, char *file, int line));
  290. EXTERN int        Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
  291. EXTERN void        Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
  292.                 int line));
  293. #  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
  294. #  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
  295. #  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
  296.  
  297. #else
  298.  
  299. #  define ckalloc(x) malloc(x)
  300. #  define ckfree(x)  free(x)
  301. #  define ckrealloc(x,y) realloc(x,y)
  302. #  define Tcl_DumpActiveMemory(x)
  303. #  define Tcl_ValidateAllMemory(x,y)
  304.  
  305. #endif /* TCL_MEM_DEBUG */
  306.  
  307. /*
  308.  * Macro to free up result of interpreter.
  309.  */
  310.  
  311. #define Tcl_FreeResult(interp)                    \
  312.     if ((interp)->freeProc != 0) {                \
  313.     if ((interp)->freeProc == (Tcl_FreeProc *) free) {    \
  314.         ckfree((interp)->result);                \
  315.     } else {                        \
  316.         (*(interp)->freeProc)((interp)->result);        \
  317.     }                            \
  318.     (interp)->freeProc = 0;                    \
  319.     }
  320.  
  321. /*
  322.  * Forward declaration of Tcl_HashTable.  Needed by some C++ compilers
  323.  * to prevent errors when the forward reference to Tcl_HashTable is
  324.  * encountered in the Tcl_HashEntry structure.
  325.  */
  326.  
  327. #ifdef __cplusplus
  328. struct Tcl_HashTable;
  329. #endif
  330.  
  331. /*
  332.  * Structure definition for an entry in a hash table.  No-one outside
  333.  * Tcl should access any of these fields directly;  use the macros
  334.  * defined below.
  335.  */
  336.  
  337. typedef struct Tcl_HashEntry {
  338.     struct Tcl_HashEntry *nextPtr;    /* Pointer to next entry in this
  339.                      * hash bucket, or NULL for end of
  340.                      * chain. */
  341.     struct Tcl_HashTable *tablePtr;    /* Pointer to table containing entry. */
  342.     struct Tcl_HashEntry **bucketPtr;    /* Pointer to bucket that points to
  343.                      * first entry in this entry's chain:
  344.                      * used for deleting the entry. */
  345.     ClientData clientData;        /* Application stores something here
  346.                      * with Tcl_SetHashValue. */
  347.     union {                /* Key has one of these forms: */
  348.     char *oneWordValue;        /* One-word value for key. */
  349.     int words[1];            /* Multiple integer words for key.
  350.                      * The actual size will be as large
  351.                      * as necessary for this table's
  352.                      * keys. */
  353.     char string[4];            /* String for key.  The actual size
  354.                      * will be as large as needed to hold
  355.                      * the key. */
  356.     } key;                /* MUST BE LAST FIELD IN RECORD!! */
  357. } Tcl_HashEntry;
  358.  
  359. /*
  360.  * Structure definition for a hash table.  Must be in tcl.h so clients
  361.  * can allocate space for these structures, but clients should never
  362.  * access any fields in this structure.
  363.  */
  364.  
  365. #define TCL_SMALL_HASH_TABLE 4
  366. typedef struct Tcl_HashTable {
  367.     Tcl_HashEntry **buckets;        /* Pointer to bucket array.  Each
  368.                      * element points to first entry in
  369.                      * bucket's hash chain, or NULL. */
  370.     Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
  371.                     /* Bucket array used for small tables
  372.                      * (to avoid mallocs and frees). */
  373.     int numBuckets;            /* Total number of buckets allocated
  374.                      * at **bucketPtr. */
  375.     int numEntries;            /* Total number of entries present
  376.                      * in table. */
  377.     int rebuildSize;            /* Enlarge table when numEntries gets
  378.                      * to be this large. */
  379.     int downShift;            /* Shift count used in hashing
  380.                      * function.  Designed to use high-
  381.                      * order bits of randomized keys. */
  382.     int mask;                /* Mask value used in hashing
  383.                      * function. */
  384.     int keyType;            /* Type of keys used in this table. 
  385.                      * It's either TCL_STRING_KEYS,
  386.                      * TCL_ONE_WORD_KEYS, or an integer
  387.                      * giving the number of ints in a
  388.                      */
  389.     Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  390.         char *key));
  391.     Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  392.         char *key, int *newPtr));
  393. } Tcl_HashTable;
  394.  
  395. /*
  396.  * Structure definition for information used to keep track of searches
  397.  * through hash tables:
  398.  */
  399.  
  400. typedef struct Tcl_HashSearch {
  401.     Tcl_HashTable *tablePtr;        /* Table being searched. */
  402.     int nextIndex;            /* Index of next bucket to be
  403.                      * enumerated after present one. */
  404.     Tcl_HashEntry *nextEntryPtr;    /* Next entry to be enumerated in the
  405.                      * the current bucket. */
  406. } Tcl_HashSearch;
  407.  
  408. /*
  409.  * Acceptable key types for hash tables:
  410.  */
  411.  
  412. #define TCL_STRING_KEYS        0
  413. #define TCL_ONE_WORD_KEYS    1
  414.  
  415. /*
  416.  * Macros for clients to use to access fields of hash entries:
  417.  */
  418.  
  419. #define Tcl_GetHashValue(h) ((h)->clientData)
  420. #define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
  421. #define Tcl_GetHashKey(tablePtr, h) \
  422.     ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
  423.                         : (h)->key.string))
  424.  
  425. /*
  426.  * Macros to use for clients to use to invoke find and create procedures
  427.  * for hash tables:
  428.  */
  429.  
  430. #define Tcl_FindHashEntry(tablePtr, key) \
  431.     (*((tablePtr)->findProc))(tablePtr, key)
  432. #define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
  433.     (*((tablePtr)->createProc))(tablePtr, key, newPtr)
  434.  
  435. /*
  436.  * Exported Tcl variables:
  437.  */
  438.  
  439. EXTERN int        tcl_AsyncReady;
  440. EXTERN void        (*tcl_FileCloseProc) _ANSI_ARGS_((FILE *f));
  441. EXTERN char *        tcl_RcFileName;
  442.  
  443. /*
  444.  * Exported Tcl procedures:
  445.  */
  446.  
  447. EXTERN void        Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
  448.                 char *message));
  449. EXTERN void        Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
  450. EXTERN void        Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
  451.                 char *string));
  452. EXTERN void        Tcl_AppendResult _ANSI_ARGS_(
  453.                 VARARGS(Tcl_Interp *interp));
  454. EXTERN int        Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
  455. EXTERN void        Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
  456. EXTERN Tcl_AsyncHandler    Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
  457.                 ClientData clientData));
  458. EXTERN void        Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
  459. EXTERN int        Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
  460.                 int code));
  461. EXTERN char        Tcl_Backslash _ANSI_ARGS_((char *src,
  462.                 int *readPtr));
  463. EXTERN void        Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
  464.                 Tcl_InterpDeleteProc *proc,
  465.                 ClientData clientData));
  466. EXTERN int        Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
  467. EXTERN char *        Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
  468. EXTERN int        Tcl_ConvertElement _ANSI_ARGS_((char *src,
  469.                 char *dst, int flags));
  470. EXTERN Tcl_Command    Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
  471.                 char *cmdName, Tcl_CmdProc *proc,
  472.                 ClientData clientData,
  473.                 Tcl_CmdDeleteProc *deleteProc));
  474. EXTERN Tcl_Interp *    Tcl_CreateInterp _ANSI_ARGS_((void));
  475. EXTERN void        Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
  476.                 char *name, int numArgs, Tcl_ValueType *argTypes,
  477.                 Tcl_MathProc *proc, ClientData clientData));
  478. EXTERN int        Tcl_CreatePipeline _ANSI_ARGS_((Tcl_Interp *interp,
  479.                 int argc, char **argv, int **pidArrayPtr,
  480.                 int *inPipePtr, int *outPipePtr,
  481.                 int *errFilePtr));
  482. EXTERN Tcl_Trace    Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
  483.                 int level, Tcl_CmdTraceProc *proc,
  484.                 ClientData clientData));
  485. EXTERN int        Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
  486.                 char *cmdName));
  487. EXTERN void        Tcl_DeleteHashEntry _ANSI_ARGS_((
  488.                 Tcl_HashEntry *entryPtr));
  489. EXTERN void        Tcl_DeleteHashTable _ANSI_ARGS_((
  490.                 Tcl_HashTable *tablePtr));
  491. EXTERN void        Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
  492. EXTERN void        Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
  493.                 Tcl_Trace trace));
  494. EXTERN void        Tcl_DetachPids _ANSI_ARGS_((int numPids, int *pidPtr));
  495. EXTERN void        Tcl_DontCallWhenDeleted _ANSI_ARGS_((
  496.                 Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
  497.                 ClientData clientData));
  498. EXTERN char *        Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
  499.                 char *string, int length));
  500. EXTERN char *        Tcl_DStringAppendElement _ANSI_ARGS_((
  501.                 Tcl_DString *dsPtr, char *string));
  502. EXTERN void        Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
  503. EXTERN void        Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
  504. EXTERN void        Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
  505.                 Tcl_DString *dsPtr));
  506. EXTERN void        Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
  507. EXTERN void        Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
  508.                 Tcl_DString *dsPtr));
  509. EXTERN void        Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
  510.                 int length));
  511. EXTERN void        Tcl_DStringStartSublist _ANSI_ARGS_((
  512.                 Tcl_DString *dsPtr));
  513. EXTERN void        Tcl_EnterFile _ANSI_ARGS_((Tcl_Interp *interp,
  514.                 FILE *file, int permissions));
  515. EXTERN char *        Tcl_ErrnoId _ANSI_ARGS_((void));
  516. EXTERN int        Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp, char *cmd));
  517. EXTERN int        Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
  518.                 char *fileName));
  519. EXTERN int        Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  520.                 char *string, int *ptr));
  521. EXTERN int        Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
  522.                 char *string, double *ptr));
  523. EXTERN int        Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
  524.                 char *string, long *ptr));
  525. EXTERN int        Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
  526.                 char *string));
  527. EXTERN int        Tcl_FilePermissions _ANSI_ARGS_((FILE *file));
  528. EXTERN Tcl_HashEntry *    Tcl_FirstHashEntry _ANSI_ARGS_((
  529.                 Tcl_HashTable *tablePtr,
  530.                 Tcl_HashSearch *searchPtr));
  531. EXTERN int        Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  532.                 char *string, int *boolPtr));
  533. EXTERN int        Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  534.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  535. EXTERN char *        Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
  536.                 Tcl_Command command));
  537. EXTERN int        Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
  538.                 char *string, double *doublePtr));
  539. EXTERN int        Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
  540.                 char *string, int *intPtr));
  541. EXTERN int        Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
  542.                 char *string, int write, int checkUsage,
  543.                 FILE **filePtr));
  544. EXTERN char *        Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
  545.                 char *varName, int flags));
  546. EXTERN char *        Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  547.                 char *part1, char *part2, int flags));
  548. EXTERN int        Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
  549.                 char *command));
  550. EXTERN char *        Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
  551. EXTERN int        Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
  552. EXTERN void        Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
  553.                 int keyType));
  554. EXTERN void        Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
  555. EXTERN int        Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  556.                 char *varName, char *addr, int type));
  557. EXTERN void        Tcl_Main _ANSI_ARGS_((int argc, char **argv,
  558.                 Tcl_AppInitProc *appInitProc));
  559. EXTERN char *        Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
  560. EXTERN Tcl_HashEntry *    Tcl_NextHashEntry _ANSI_ARGS_((
  561.                 Tcl_HashSearch *searchPtr));
  562. EXTERN char *        Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
  563.                 char *string, char **termPtr));
  564. EXTERN char *        Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
  565. EXTERN void        Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
  566.                 double value, char *dst));
  567. EXTERN void        Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
  568. EXTERN int        Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
  569.                 char *cmd, int flags));
  570. EXTERN Tcl_RegExp    Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
  571.                 char *string));
  572. EXTERN int        Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
  573.                 Tcl_RegExp regexp, char *string, char *start));
  574. EXTERN int        Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
  575.                 char *string, char *pattern));
  576. EXTERN void        Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
  577.                 int index, char **startPtr, char **endPtr));
  578. EXTERN void        Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
  579. #define Tcl_Return Tcl_SetResult
  580. EXTERN int        Tcl_ScanElement _ANSI_ARGS_((char *string,
  581.                 int *flagPtr));
  582. EXTERN int        Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  583.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  584. EXTERN void        Tcl_SetErrorCode _ANSI_ARGS_(
  585.                 VARARGS(Tcl_Interp *interp));
  586. EXTERN int        Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
  587.                 int depth));
  588. EXTERN void        Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
  589.                 char *string, Tcl_FreeProc *freeProc));
  590. EXTERN char *        Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
  591.                 char *varName, char *newValue, int flags));
  592. EXTERN char *        Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  593.                 char *part1, char *part2, char *newValue,
  594.                 int flags));
  595. EXTERN char *        Tcl_SignalId _ANSI_ARGS_((int sig));
  596. EXTERN char *        Tcl_SignalMsg _ANSI_ARGS_((int sig));
  597. EXTERN int        Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
  598.                 char *list, int *argcPtr, char ***argvPtr));
  599. EXTERN int        Tcl_StringMatch _ANSI_ARGS_((char *string,
  600.                 char *pattern));
  601. EXTERN char *        Tcl_TildeSubst _ANSI_ARGS_((Tcl_Interp *interp,
  602.                 char *name, Tcl_DString *bufferPtr));
  603. EXTERN int        Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  604.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  605.                 ClientData clientData));
  606. EXTERN int        Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  607.                 char *part1, char *part2, int flags,
  608.                 Tcl_VarTraceProc *proc, ClientData clientData));
  609. EXTERN void        Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  610.                 char *varName));
  611. EXTERN int        Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
  612.                 char *varName, int flags));
  613. EXTERN int        Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  614.                 char *part1, char *part2, int flags));
  615. EXTERN void        Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  616.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  617.                 ClientData clientData));
  618. EXTERN void        Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  619.                 char *part1, char *part2, int flags,
  620.                 Tcl_VarTraceProc *proc, ClientData clientData));
  621. EXTERN int        Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
  622.                 char *frameName, char *varName,
  623.                 char *localName, int flags));
  624. EXTERN int        Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  625.                 char *frameName, char *part1, char *part2,
  626.                 char *localName, int flags));
  627. EXTERN int        Tcl_VarEval _ANSI_ARGS_(VARARGS(Tcl_Interp *interp));
  628. EXTERN ClientData    Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
  629.                 char *varName, int flags,
  630.                 Tcl_VarTraceProc *procPtr,
  631.                 ClientData prevClientData));
  632. EXTERN ClientData    Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
  633.                 char *part1, char *part2, int flags,
  634.                 Tcl_VarTraceProc *procPtr,
  635.                 ClientData prevClientData));
  636.  
  637. #endif /* _TCL */
  638.